package com.attendance.chdingtask.utils;

import com.alibaba.fastjson.JSONObject;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiV2DepartmentListsubidRequest;
import com.dingtalk.api.request.OapiV2UserGetRequest;
import com.dingtalk.api.response.CorpReportListResponse;
import com.dingtalk.api.response.OapiV2DepartmentListsubidResponse;
import com.dingtalk.api.response.OapiV2UserGetResponse;
import com.taobao.api.ApiException;
import lombok.var;

import java.io.*;

public class Testutils {

    private static String CloudUrl = "http://180.167.46.250:8888/k3cloud";





    public static void main(String[] args) throws ApiException, IOException {

        InputStream inputStream = null;

        byte[] buf = new byte[65536];
        byte[] buf_out = new byte[66048];

        //TiprayAPI t = new TiprayAPI();
        int offset = 0;
        String downloadFilePath = "/Users/boxiaonan/Desktop/Desktop/魔点钉钉开门记录回调接口 - 服务商.pdf";
        System.out.println("本地文件服务器：文件路径==> " + downloadFilePath);
        File file = new File(downloadFilePath);

        if (file.exists()) {
            inputStream = new BufferedInputStream(new FileInputStream(file));

            int nread = inputStream.read(buf);
            while ( (nread = inputStream.read(buf,0,4096)) > 0)
            {/**开始加密文件**/
                System.out.println(nread);
                offset += nread;
            }
            System.out.println(offset);



        }

    }
}
